
  <script type="text/javascript">
    function reloadposts() {
	  $('#page table').load('/panel/log/?ajax=1');
    }
    function delpost( id ) {
      jConfirm('Are you sure tou want to delete this post?', 'Are you sure?', 
              function(r) {
	            if (r)
                $.ajax({
                        url: '/panel/post/?ajax=1&act=del&id='+id,
                        dataType: "text", 
                        type: "get",
                        success: function(){ reloadposts(); }
                });
      });
    }
  </script>
  <table style="width:90%">
    <?php foreach( $post as $p ): ?>
    
    <tr>
      <td><?=$p->get_id() ?></td>
      <td><a href="/panel/post/<?=$p->get_id() ?>/"><?=$p->title ?></a></td>
      <td><a href="/post/<?=$p->get_linkdate() ?>/<?=$p->permalink ?>/"><?=$p->permalink ?></a></td>
      <td><a href="javascript:void(0);" onclick="delpost(<?=$p->get_id()?>);">delete</a></td>
    </tr>
    
    <?php endforeach; ?>
  </table>
  
  